import {combineReducers} from 'redux';
import counter from './counter';
import history from '../../history';
import {connectRouter} from 'connected-react-router';


//组合多个reducer ，默认导出
let combineReducer = combineReducers({
    counter,
    //connectRouter是个函数，他会返回一个reducer，这个reducer是用来把 "路径信息" 保存到仓库里面去的
    router: connectRouter(history)
});

//state.router就可以获取到最新的路径信息啦
export default combineReducer;
